package com.jeecg.p3.system.order.dao;

import com.jeecg.p3.system.order.entity.ProductDetails;
import org.apache.ibatis.annotations.Param;
import org.jeecgframework.p3.core.utils.common.PageQuery;
import org.jeecgframework.p3.core.utils.common.PageQueryWrapper;
import org.jeecgframework.p3.core.utils.persistence.GenericDao;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface ProductDetailsDao extends GenericDao<ProductDetails> {
    public Integer count(PageQuery<ProductDetails> pageQuery);

    public List<ProductDetails> queryPageList(PageQueryWrapper<ProductDetails> wrapper);

    /**
     * 根据传入实体类的参数获取订单列表 1
     * @param courseOrder
     * @return
     */
    public List<ProductDetails> findByParam(ProductDetails courseOrder);

    /**
     * 去重查询用户已购买的课程信息
     * @param productDetails
     * @return
     */
    public List<ProductDetails> findByParamGroupBy(ProductDetails productDetails);

    public ProductDetails findByOpenId(String openId);


    public void updateGoodLst(int payStatus, String updateDate, String dataLsh);

    void updateUseStatus(@Param("useStatus") int useStatus, @Param("orderNo") String orderNo );
}
